New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix minor search summary issues #10548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these severe enough regressions to go in 5.0.2?
A
@@ -158,7 +158,7 @@ const Search = { | |||
const htmlElement = document | |||
.createRange() | |||
.createContextualFragment(htmlString); | |||
_removeChildren(htmlElement.querySelectorAll(".headerlink")); | |||
htmlElement.querySelectorAll(".headerlink").forEach((el) => el.parentNode.removeChild(el)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the functional change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This previously used jQuery's htmlElement.find('.headerlink').remove()
, which would remove the .headerlink
s themselves.
As far as I can tell, _removeChildren
is meant to be a replacement for .empty()
- it only takes a single element instead of a NodeList
as returned by querySelectorAll
, and would only remove child elements instead of the element itself; as it stands right now I'm fairly sure this particular call is effectively a no-op.
The functional change here is just getting rid of the ¶
glyphs in the output as intended.
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Subject: Fix minor search summary issues
Feature or Bugfix
Purpose
I believe all of these are mainly cosmetic minor regressions from #10028.
See 5.x vs this branch for comparison (with rtd's server-side search disabled as it's not an issue when that's used).
Details
<p>
instead of<div>
, fixes styling (originally changed in 339cab7)